#ifndef DATASUITE_H
#define DATASUITE_H


#include "datasuite_global.h"
#include "datacontainer.h"
#include "metadata.h"


#include <QPointer>


class DATASUITESHARED_EXPORT DataSuite : public DataContainer
{
    Q_OBJECT

    class Data : public QSharedData
    {
    public:

        Data() {}
        Data(const Data& other) : QSharedData(other)
        {
            meta = other.meta;

        }

        QPointer<MetaData> meta;

    };


public:

    Q_INVOKABLE DataSuite(DataSuite* parent = 0);
    DataSuite(const DataSuite& other);


signals:

    void sigResolveMetaData(MetaData* metaData) const;


protected:

    virtual MetaData* metaData() const;
    MetaData* containerMetaData() const;


protected slots:

    void onResolveMetaData(MetaData* metaData);
    void onCreateMetaData();


private:

    QSharedDataPointer<Data> d;

    friend class DataContainer;


};


Q_DECLARE_METATYPE(DataSuite*)


#endif // DATASUITE_H
